#include "importstudyview.h"

#include <QHeaderView>

ImportStudyView::ImportStudyView(QWidget *parent) :
    QTableView(parent)
{
    setSelectionBehavior(QAbstractItemView::SelectRows);
    setSelectionMode(QAbstractItemView::ExtendedSelection);
    horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);
    horizontalHeader()->setStretchLastSection(true);
    horizontalHeader()->setMinimumSectionSize(100);
    setEditTriggers(QAbstractItemView::NoEditTriggers);
}

void ImportStudyView::selectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
{
    selection.merge(selected, QItemSelectionModel::Select);
    selection.merge(deselected, QItemSelectionModel::Deselect);

    QTableView::selectionChanged(selected, deselected);
}
